library downlndr;

uses
  AppInterface in '..\AppInterface.pas',
  Core_Types in '..\..\Core_Types.pas',
  Interface_WndMain in 'Interface_WndMain.pas' {WndDownload};

var
  PluginInterface : TPluginInterface;
  MI_Proc : Integer;

function ShowMainDialog : Integer;
begin
  AppFace._Application.CreateForm(TWndDownload, WndDownload);
  WndDownload.Show;
end;

function PluginLoad(AppIntrfc : PAppInterface; PluginInt : PPluginInterface) : Integer;
begin
  PluginInterface.Name := 'Download';

  AppFace := AppIntrfc^;
  PluginInt^ := PluginInterface;

  MI_Proc := AppFace.PE_RegisterProc(@ShowMainDialog);
  AppFace.UI_AddMenuItem('-', 0);
  AppFace.UI_AddMenuItem('Download', MI_Proc);
  AppFace.UI_AddMenuItem('-', 0);

  Result := 0;
end;

exports
  PluginLoad;

begin
end.
 